﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;

namespace FreeOnlineApplication.Class.Entity
{
    public class FacilityTransaction
    {
        public int ID = 0;
        public string CODE = "";
        public CheckIn CHECK_IN = null;
        public double TOTAL_AMOUNT = 0;
        public Unit UNIT;
        public IList FACILITY_ITEMS;

        public FacilityTransaction()
        {
            FACILITY_ITEMS = new ArrayList();
        }
        public FacilityTransaction(int id)
            : this()
        {
            ID = id;
        }
        public FacilityTransaction(int id, string code)
            : this()
        {
            ID = id;
            CODE = code;
        }
    }
    public class FacilityTransactionItem
    {
        public int ID = 0;
        public FacilityTransaction FACILITY_TRANSACTION = null;
        public Facility FACILITY = null;
        public double PRICE = 0;
        public double QUANTITY = 0;
        public double SUB_AMOUNT = 0;

        public FacilityTransactionItem()
        {
        }
        public FacilityTransactionItem(int id)
        {
            ID = id;
        }
        public FacilityTransactionItem(int id, FacilityTransaction ft)
        {
            ID = id;
            FACILITY_TRANSACTION = ft;
        }
        public override bool Equals(object obj)
        {
            FacilityTransactionItem r = (FacilityTransactionItem)obj;
            if (r == null) return false;
            return r.ID == ID;
        }
    }
}
